package com.onemileshop.controls;

import java.util.List;

import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;

public class AdpVP_Main extends PagerAdapter
{
   List<View> listViews;
   
   public AdpVP_Main()
   {
	  
   }
   
   public AdpVP_Main(List<View> _listViews)
   {
	  listViews = _listViews;
   }

   @Override
   public void destroyItem(View arg0, int arg1, Object arg2)
   {
	  ((ViewPager) arg0).removeView(listViews.get(arg1));
   }

   @Override
   public void finishUpdate(View arg0)
   {

   }

   @Override
   public int getCount()
   {
	  return listViews.size();
   }

   @Override
   public Object instantiateItem(View arg0, int index)
   {
	  ((ViewPager) arg0).addView(listViews.get(index), 0);
	  return listViews.get(index);
   }

   @Override
   public boolean isViewFromObject(View arg0, Object arg1)
   {
	  return arg0 == (arg1);
   }

   @Override
   public void restoreState(Parcelable arg0, ClassLoader arg1)
   {

   }

   @Override
   public Parcelable saveState()
   {
	  return null;
   }

   @Override
   public void startUpdate(View arg0)
   {

   }


}
